#ifndef SYNCPUBLISH_H
#define SYNCPUBLISH_H

#include <libmqttcpp/client.h>
#include "mqttclient.h"
#include "syncpubltools.h"

class SyncPublish : public MqttClient
{
    Q_OBJECT
public:
    SyncPublish();

    bool activate();
    bool deactivate();

    void sendMessage(std::string message);
    void sendMessage(const QString&, std::string message);
    void sendCommandControl(std::string send_str, std::string& responce_str);

private:
    mqtt::client* m_client;
    sync_publish_tools::sample_mem_persistence m_persist;
    sync_publish_tools::callback m_cb;
    mqtt::connect_options m_connOpts;

signals:
    void commandControl(QByteArray, QString*);

};

#endif // SYNCPUBLISHMANAGER_H
